package com.masterclient.app.businessmodule.settingmodule.crossborder.adapter;

import android.view.View;
import android.widget.TextView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.masterclient.app.R;
import com.masterclient.app.businessmodule.settingmodule.crossborder.model.NewCrossBorderUserMessage;


public class CrossBorderSelectAdapter extends BaseQuickAdapter<NewCrossBorderUserMessage, BaseViewHolder> {

    public CrossBorderSelectAdapter() {
        super(R.layout.cross_border_name_select_item);
    }

    @Override
    protected void convert(BaseViewHolder helper, NewCrossBorderUserMessage item) {
        helper.setText(R.id.name,item.realName);
        helper.setText(R.id.card_id,"身份证：" + item.identityCardNumber);
        helper.addOnClickListener(R.id.item);
        TextView default_flag = helper.getView(R.id.default_flag);
        if(item.isDefault){
            default_flag.setVisibility(View.VISIBLE);
        }else {
            default_flag.setVisibility(View.GONE);
        }
    }


}
